package com.thirdgroup.dao.impl;

import com.thirdgroup.dao.OrderInfoDao;
import com.thirdgroup.dao.base.BaseDAO;
import com.thirdgroup.pojo.entity.OrderInfo;

import java.util.List;

public class OrderInfoDaoImpl extends BaseDAO<OrderInfo> implements OrderInfoDao {
    @Override
    public List<OrderInfo> selectByManagerID(String managerid) {
        String sql="select * from order_info where managerID=?";
        Object[] params={managerid};
        return findAll(sql,params);
    }

    @Override
    public Integer updateState(String id, String status, String date) {
        String sql="update order_info set orderStatus=? , updateTime=? where orderID=? ";
        Object[] params={status,date,id};
        return executeSQL(sql,params);
    }
}
